
/**
 * copyright(c) 2013 www.jiongshibaoliao.com, All Rights Reserved.
 * project: jiongshibaoliao 
 * author: 曾帅
 * date: 2014-1-16 上午10:56:06
 * version: v1.0
 */

package com.jiongshibaoliao.service.impl;

import com.jiongshibaoliao.dao.BaseDao;
import com.jiongshibaoliao.exception.JiongException;
import com.jiongshibaoliao.service.BaseService;

/**
 * @project jiongshibaoliao
 * @author 曾帅 
 * @version 1.0
 * @date 2014-1-16 上午10:56:06   
 */

public abstract class BaseServiceImpl implements BaseService {

	
	/**
	 * 
	 * @author 曾帅
	 * @version 1.0
	 * @date 2014-1-16 上午10:56:23
	 * @see com.jiongshibaoliao.service.BaseService#create(java.lang.Object)
	 */
	@Override
	public <T> void create(T entity) {
		getDao().create(entity);
	}

	
	/**
	 * 
	 * @author 曾帅
	 * @version 1.0
	 * @date 2014-1-16 上午10:56:23
	 * @see com.jiongshibaoliao.service.BaseService#delete(long)
	 */
	@Override
	public void delete(long id) throws JiongException {
		getDao().delete(id);		
	}

	
	/**
	 * 
	 * @author 曾帅
	 * @version 1.0
	 * @date 2014-1-16 上午10:56:23
	 * @see com.jiongshibaoliao.service.BaseService#getEntityById(long)
	 */
	@Override
	public Object getEntityById(long id) {
		return getDao().getEntityById(id);
	}

	
	/**
	 * 
	 * @author 曾帅
	 * @version 1.0
	 * @date 2014-1-16 上午10:56:23
	 * @see com.jiongshibaoliao.service.BaseService#modify(java.lang.Object)
	 */
	@Override
	public <T> void modify(T entity) throws JiongException {
		getDao().modify(entity);		
	}
	
	public abstract BaseDao getDao();

}
